package org.huangrui.javase.api;

import org.junit.Test;

/**
 * @Author hr
 * @Create 2025-11-07 12:03
 **/
public class T05StringConcat {
    @Test
    public void test1(){
        String s1 = "helloworld";
        String s2 = "hello" + "world";
        System.out.println(s1 == s2);//true
    }

    @Test
    public void test2(){
        String s1 = "helloworld";
        String s2 = "hello".concat("world");
        System.out.println(s1 == s2);//false
    }
}
